[PATCH] readelf: Allocate job_data one-by-one as needed
Currently, job_data is stored in an array whose size is equal to the
number of debug sections (.debug_*, .eh_frame, .gdb_index, etc.).
This size may be too small if a binary contains multiple debug sections
with the same name. For example an ET_REL binary compiled with -ggdb3
can contain multiple .debug_macro sections.
Fix this by allocating job_data on the fly when preparing to read a
debug section. This supports an arbitrary number of debug sections
while also avoiding unnecessary memory allocation.
https://sourceware.org/bugzilla/show_bug.cgi?id=33580
Signed-off-by: Aaron Merey <amerey@redhat.com>
Gbp-Pq: Name elfutils-0.194-alloc-jobs.patch